#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    edit = new QLineEdit(" ",this);
    edit->setGeometry(120,30,100,100);
    lbl = new QLabel("QLineEdit Text :",this);
    lbl->setGeometry(10,30,200,100);
    connect(edit,SIGNAL(textChanged(QString)),this,SLOT(textChanged(QString)));

    int ypos = 150;
    for(int i=1;i<5;i++){
        edits[i] = new QLineEdit("I love MeeGo",this);
        edits[i]->setGeometry(10,ypos,200,40);
        ypos+=50;

    }

    edits[1]->setEchoMode(QLineEdit::Normal);
    edits[2]->setEchoMode(QLineEdit::NoEcho);
    edits[3]->setEchoMode(QLineEdit::Password);
    edits[4]->setEchoMode(QLineEdit::PasswordEchoOnEdit);



}

Widget::~Widget()
{
}

void Widget::textChanged(QString str){
    qDebug(str.toStdString().c_str());
}

